<?php
header("content-type:text/html;charset:utf-8");

// 获取传入的参数
$n = $_GET["username"];
$p = $_GET["password"];

$link = mysqli_connect("localhost","root","","user");
mysqli_set_charset($link,"utf8");
$sql = "select * from onlyuser where user='$n' and pass='$p'";
$result = mysqli_query($link,$sql);
if(mysqli_fetch_row($result)){
    echo "1";
}else{
    echo "0";
}

?>